package com.foreknow.service;

import com.foreknow.entity.Constantitem;
import com.foreknow.entity.Department;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

public interface DepartmentService {
    /**
     * 根据id删除
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Integer id);
    /**
     * 添加
     * @param record
     * @return
     */
    int insert(Department record);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Department selectByPrimaryKey(Integer id);
    /**
     * 查询所有科室
     * @param
     * @return
     */
    List<Department> selectAllDepartment();
    /**
     * 根据条件查询所有科室
     * @param deptType
     * @return
     */
    List<Department> selectAllDepartmentByCondition(Integer deptType);
    /**
     * 根据record更新
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(Department record);
    /**
     * 根据record更新
     * @param record
     * @return
     */
    int updateByPrimaryKey(Department record);

    /**
     * 查询所有科室信息
     * @return
     */
    public List<Department> queryDeptName();

    /**
     * 查询Constantitem所有科室分类信息
     * @return
     */
    public List<Constantitem> queryItem(int id);

    /**
     * 根据id删除科室信息
     * @param id
     * @return
     */
    public int deleteDepById(int id);

    /**
     * 添加科室信息
     * @param department
     * @return
     */
    public int insertDep(Department department);

    /**
     * 修改科室信息
     * @param department
     * @return
     */
    public int updateDep(Department department);

    /**
     * 条件查询科室信息
     * @param department
     * @return
     */
    public List<Department> selectByWhere(Department department);

    /**
     * 根据id查询科室信息
     * @param id
     * @return
     */
    public Department seletById(int id);

    /**
     * 批量添加科室信息
     * @param
     * @return
     */
    public int excelToList(InputStream inputStream) throws IOException,  org.apache.poi.openxml4j.exceptions.InvalidFormatException;
}
